package com.eadaula05.arquivos;

import java.io.*;

public class LerObject {
	public static void main (String[] args){
		try{
			File f = new File("dados.txt");
			ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f));
			
			String line = null;
			while ((line = (String) ois.readObject())!= null){
				System.out.println(line);
			}
			ois.close();
		} catch (Exception ex) {
			System.out.println("File not found");
			ex.printStackTrace();
		}
	}

}
